//https://www.luogu.com.cn/problem/P1177
#include<random>
#include<iostream>
#include<vector>
#include<algorithm>
template<typename _RAiter,typename Compare>
void my_fast_sort(_RAiter _begin,_RAiter _end, Compare less_than){
	int size=_end-_begin;
	if(_end-_begin<=2){
		if(_end-_begin<=1){return;}
		else{
			--_end;
			if(less_than(*_end,*_begin)){
				std::swap(*_end,*_begin);}
		}
	}
	typename _RAiter::value_type criteria=*_begin;
	_RAiter ll=_begin,rr=_end-1;
	bool flag=true;
	while(ll!=rr){
			while(ll!=rr&&!less_than(*rr,criteria)){
				--rr;
			}
			
			if(ll==rr){break;}
			*ll=*rr;
			flag^=true;
		
		
			while(ll!=rr&&less_than(*ll,criteria)){
				++ll;
			}
			if(ll==rr){break;}
			*rr=*ll;
			flag^=true;
		
	}
	*ll=criteria;
	my_fast_sort(_begin,ll,less_than);
	my_fast_sort(ll+1,_end,less_than);
}


int main(){
	using namespace std;
	int num,temp;
	cin>>num;
	vector<int> v;
	v.resize(num);
	for(int i=0;i<num;++i){
		cin>>v[i];
	}

	my_fast_sort(v.begin(),v.end(),[](int a,int b){return a<b;});
	for(int i=0;i<num-1;++i){cout<<v[i]<<' ';}
	cout<<v[num-1]<<'\n';
	
}